package com.birth.memo.service;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.birth.memo.db.ConfigCenter;
import com.birth.memo.util.Constants;

public class CheckNotification extends BroadcastReceiver{
	
	private CheckBirthService checkService;
	
	@Override
	public void onReceive(Context context, Intent intent) {
		if(checkService == null){
			checkService = new CheckBirthService(context);
		}
	     //执行方法体，实现业务逻辑
		if(ConfigCenter.getValue(context, Constants.KEY_ENABLE_NOTIFICATION, true)){
			checkService.checkBirthday();
		}
	}
	
	

}
